﻿<Window x:Class="ZoneWorkspace.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:cab="http://schemas.scsfcontrib.com/extensions/wpf/wpfcab" 
    Title="ZoneWorkspace">
	<DockPanel>
		<StackPanel DockPanel.Dock="Top">
			<TextBlock TextWrapping="Wrap">
				This sample demonstrates the ZoneWorkspace class. Below is a ZoneWorkspace. Select the zone you want to work with
				and then use the hyperlinks to perform various actions in that zone. Note that the zone selection only affects
				showing smart parts - hiding and closing does not need to specify a zone name.
			</TextBlock>
			<StackPanel Orientation="Horizontal">
				<Label>Zone:</Label>
				<ComboBox x:Name="_zoneComboBox" SelectedIndex="0">
					<ComboBoxItem>Default content area</ComboBoxItem>
					<ComboBoxItem>Header</ComboBoxItem>
					<ComboBoxItem>Navigation</ComboBoxItem>
					<ComboBoxItem>Footer</ComboBoxItem>
				</ComboBox>
			</StackPanel>
			<TextBlock>
				Smart Part 1: <Hyperlink Click="_show_Click" Tag="1">Show</Hyperlink> | <Hyperlink Click="_hide_Click" Tag="1">Hide</Hyperlink> | <Hyperlink Click="_close_Click" Tag="1">Close</Hyperlink>
			</TextBlock>
			<TextBlock>
				Smart Part 2: <Hyperlink Click="_show_Click" Tag="2">Show</Hyperlink> | <Hyperlink Click="_hide_Click" Tag="2">Hide</Hyperlink> | <Hyperlink Click="_close_Click" Tag="2">Close</Hyperlink>
			</TextBlock>
			<TextBlock>
				Smart Part 3: <Hyperlink Click="_show_Click" Tag="3">Show</Hyperlink> | <Hyperlink Click="_hide_Click" Tag="3">Hide</Hyperlink> | <Hyperlink Click="_close_Click" Tag="3">Close</Hyperlink>
			</TextBlock>
			<TextBlock>
				Smart Part 4: <Hyperlink Click="_show_Click" Tag="4">Show</Hyperlink> | <Hyperlink Click="_hide_Click" Tag="4">Hide</Hyperlink> | <Hyperlink Click="_close_Click" Tag="4">Close</Hyperlink>
			</TextBlock>
		</StackPanel>
		<cab:ZoneWorkspace x:Name="_zoneWorkspace" DefaultZone="{Binding ElementName=_defaultZone}">
			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition Height="100"/>
					<RowDefinition Height="*"/>
					<RowDefinition Height="80"/>
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="150"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>

				<ContentControl cab:ZoneWorkspace.ZoneName="Header" Grid.ColumnSpan="2"/>
				<ContentControl cab:ZoneWorkspace.ZoneName="Navigation" Grid.Row="1"/>
				<ContentControl cab:ZoneWorkspace.ZoneName="Footer" Grid.Row="2" Grid.ColumnSpan="2"/>
				<ContentControl x:Name="_defaultZone" Grid.Row="1" Grid.Column="1"/>
			</Grid>
		</cab:ZoneWorkspace>
	</DockPanel>
</Window>
